<template>
  <div class="home_r">
    <div class="conclusion">
      <div class="flex home_header">
        <div class="hd_img">
          <img src="@/assets/evaluation/user.png" alt="" />
        </div>
        <div class="flex_unit hd_info">
          <div class="hd_name">
            <span>Alice</span>
            <img src="@/assets/evaluation/icon.png" alt="" />
          </div>
          <div class="hd_time">
            <span>更新时间：2020-09-30 14:55</span>
            <button>已测评</button>
          </div>
        </div>
        <div class="hd_icon">
          <img src="@/assets/evaluation/wx.png" alt="" />
        </div>
      </div>
      <div class="flex home_info">
        <div class="flex_unit">年龄区间：18-25周岁</div>
        <div class="flex_unit">最高学历：本科</div>
        <div class="flex_unit">上一职业：检验员</div>
        <div class="hi_more" @click="godetails">
          详情 <i class="el-icon-arrow-right"></i>
        </div>
      </div>
      <div v-if="!isShow" class="conclusion_content">
        <div class="conclusion_title">您理想中的事业</div>
        <table class="conclusion_table" cellpadding="0" cellspacing="0">
          <thead>
            <tr>
              <th></th>
              <th>现状</th>
              <th>理想期望值</th>
              <th></th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>生活水平</td>
              <td>10.0</td>
              <td>10.0</td>
              <td><img src="../../assets/evaluation/t2.png" alt="" /></td>
            </tr>
            <tr>
              <td>学习成长</td>
              <td>10.0</td>
              <td>9.0</td>
              <td><img src="../../assets/evaluation/t2.png" alt="" /></td>
            </tr>
            <tr>
              <td>工作自主</td>
              <td>6.2</td>
              <td>8.0</td>
              <td><img src="../../assets/evaluation/t1.png" alt="" /></td>
            </tr>
            <tr>
              <td>收入丰厚</td>
              <td>8.0</td>
              <td>10.0</td>
              <td><img src="../../assets/evaluation/t1.png" alt="" /></td>
            </tr>
            <tr>
              <td>发展空间</td>
              <td>4.3</td>
              <td>8.0</td>
              <td><img src="../../assets/evaluation/t1.png" alt="" /></td>
            </tr>
          </tbody>
        </table>
        <div class="describe">
          <div class="describe_content">
            <ul>
              <li>
                <label>生活平衡：</label>
                <p>
                  您对生活和事业抱有崇高理想，能面对现实，遇见困难挫折能设法克服，能与人合作，创造事业。
                </p>
              </li>
              <li>
                <label>学习成长：</label>
                <p>
                  给自己设置超出自身能力的目标，加大了“达标”的难度，又饱受“失败”的打击和折磨，理想不是简单的幻想，切忌好高骛远
                </p>
              </li>
              <li>
                <label>工作自主：</label>
                <p>
                  您自立自强，当机立断。通常能够自作主张，独立完成自己的工作计划，不依赖别人，也不受社会舆论的约束。
                </p>
              </li>
              <li>
                <label>收入丰厚：</label>
                <p>
                  收入满意度,是用于衡量个人对自身当前收入满意程度的指标。您当前的收入水平处于中等收入水平，未来还有望提高。
                </p>
              </li>
            </ul>
          </div>
        </div>
        <div class="conclusion_title">竞争力评估</div>
        <div class="k_lien_box">
          <div class="k_lien">
            <img src="@/assets/evaluation/chart.png" alt="" />
          </div>
          <ul class="assessment">
            <li>
              <label>社交竞争力</label>
              <div>
                <i>8.2</i>
                <span>社交达人型</span>
              </div>
            </li>
            <li>
              <label>领袖潜能</label>
              <div>
                <i>7.1</i>
                <span>团队协调型</span>
              </div>
            </li>
            <li>
              <label>持续学习力</label>
              <div>
                <i>6.2</i>
                <span>学习爱好型</span>
              </div>
            </li>
            <li>
              <label>适应力</label>
              <div>
                <i>8.0</i>
                <span>变化适应型</span>
              </div>
            </li>
            <li>
              <label>逻辑思维</label>
              <div>
                <i>4.3</i>
                <span>逻辑清晰型</span>
              </div>
            </li>
            <li>
              <label>自我管理</label>
              <div>
                <i>6.0</i>
                <span>计划型</span>
              </div>
            </li>
          </ul>
        </div>
        <div class="conclusion_title">综合评价</div>
        <div class="describe">
          <div class="describe_content">
            <ul>
              <li>
                <p>
                  通过对您综合能力的评估，您有成为优秀营销员的潜力，建议您与营销员主管做进一步的沟通，深入了解您的现状及职业发展等，让友邦在未来帮助您提升个人能力和实现职业愿景。
                </p>
              </li>
            </ul>
          </div>
        </div>
        <div class="conclusion_title">个人优势</div>
      </div>
      <div v-if="!isShow" class="footer">
        <button class="save_btn" @click="dialogFormVisible = true">
          预约面试
        </button>
        <button class="save_btn">邀请面试</button>
        <button class="goback_btn" @click="resurveyFn">重测</button>
      </div>
      <interview v-if="isShow"></interview>
      <van-popup v-model="dialogFormVisible" style="z-index: 2000">
        <div class="dialog_make">
          <img
            class="close"
            src="../../assets/close@2x.png"
            @click="dialogFormVisible = false"
            alt=""
          />
          <div class="dialog_make_title">预约面试</div>
          <div class="dialog_make_body">
            <div class="dialog_make_left">
              <div
                class="flex home_header"
                style="padding: 0; padding-bottom: 0.2rem"
              >
                <div class="hd_img">
                  <img src="@/assets/evaluation/user.png" alt="" />
                </div>
                <div class="flex_unit hd_info">
                  <div class="hd_name">
                    <span>Alice</span>
                    <img src="@/assets/evaluation/icon.png" alt="" />
                  </div>
                  <div class="hd_time">
                    <span>登记：2020-09-30 14:55</span>
                  </div>
                </div>
              </div>
              <el-form :model="form">
                <el-form-item label="预约日期" :label-width="formLabelWidth">
                  <el-date-picker
                    v-model="form.makeTime"
                    type="date"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="开始日期" :label-width="formLabelWidth">
                  <el-date-picker
                    v-model="form.startTime"
                    type="date"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="结束日期" :label-width="formLabelWidth">
                  <el-date-picker
                    v-model="form.endTime"
                    type="date"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-form>
            </div>
            <div class="dialog_make_right">
              <calender></calender>
            </div>
          </div>
        </div>
        <div class="dialog_footer">
          <button @click="interviewFn">确定</button>
        </div>
      </van-popup>
    </div>
  </div>
</template>
<script>
import calender from "@/components/calender";
import interview from "./interview";
export default {
  name: "Conclusion",
  components: {
    calender,
    interview,
  },
  data() {
    return {
      isShow: false,
      formLabelWidth: "0.68rem",
      form: {
        endTime: "",
        makeTime: "",
        startTime: "",
      },
      dialogFormVisible: false,
      tableData: [
        {
          type: "生活水平",
          date: "1.0",
          name: "9.0",
          address: "202002",
        },
        {
          type: "生活水平",
          date: "1.0",
          name: "9.0",
          address: "202002",
        },
      ],
      currentRow: null,
    };
  },
  methods: {
    godetails() {
      this.$router.push({
        path: "/talentpool"
      });
    },
    interviewFn() {
      this.isShow = !this.isShow;
      this.dialogFormVisible = false;
    },
    resurveyFn() {
      this.$parent.gobackFn();
    },
  },
};
</script>
<style scoped>
.conclusion >>> .van-popup {
  background: none;
}
</style>
<style lang="less" scoped>
.dialog_footer {
  height: 0.66rem;
  text-align: center;
  background: #fff;
  width: 7.6rem;
  border-bottom-right-radius: 0.08rem;
  border-bottom-left-radius: 0.08rem;
  margin-right: 0.15rem;
  button {
    width: 1.3rem;
    height: 0.36rem;
    border-radius: 0.04rem;
    background: #d41045;
    font-size: 0.16rem;
    color: #ffffff;
  }
}
.dialog_make_body {
  display: flex;
  padding: 0.3rem 0.54rem;
  .dialog_make_left {
    width: 3.11rem;
    margin-right: 0.7rem;
  }
  .dialog_make_right {
    width: 3.79rem;
  }
}
.dialog_make {
  width: 7.6rem;
  height: 3.58rem;
  border-top-right-radius: 0.08rem;
  border-top-left-radius: 0.08rem;
  background: #fff;
  margin-top: 0.15rem;
  margin-right: 0.15rem;
  position: relative;
  .dialog_make_title {
    padding-top: 0.21rem;
    padding-left: 0.36rem;
    font-size: 0.16rem;
    color: #5a6b80;
    background: url("../home/img1/biaoti_icon.png") no-repeat 0.2rem 0.22rem;
    background-size: 0.06rem 0.2rem;
  }
  .close {
    position: absolute;
    right: -0.15rem;
    top: -0.15rem;
    width: 0.3rem;
  }
}
.k_lien_box {
  display: flex;
  justify-content: center;
  align-items: center;
  .k_lien {
    width: 2.45rem;
    margin-right: 0.3rem;
    min-width: 2.45rem;
    img {
      width: 100%;
      display: block;
    }
  }
  .assessment {
    width: 2.36rem;
    li {
      display: flex;
      margin-bottom: 0.08rem;
      label {
        font-size: 0.12rem;
        color: #666666;
        text-align: right;
        line-height: 0.3rem;
        width: 0.6rem;
        margin-right: 0.18rem;
      }
      div {
        width: 1.58rem;
        height: 0.3rem;
        background: rgba(255, 224, 224, 0.23);
        border-radius: 0.3rem;
        text-align: center;
        line-height: 0.3rem;
        i {
          font-style: normal;
          font-size: 0.18rem;
          color: #d41045;
          margin-right: 0.14rem;
        }
        span {
          font-size: 0.15rem;
          color: #d41045;
        }
      }
    }
  }
}
.conclusion {
  height: 100%;
  overflow: hidden;
  .conclusion_content {
    height: calc(100% - 1.96rem);
    overflow-y: auto;
    .conclusion_table {
      border: 1px solid #f9da9e;
      width: 4.74rem;
      margin: 0 auto;
      border-bottom: 0;
      border-right: 0;
      margin-bottom: 0.26rem;
      th,
      td {
        border-bottom: 1px solid #f9da9e;
        border-right: 1px solid #f9da9e;
        font-weight: normal;
        font-size: 0.12rem;
        text-align: center;
        padding: 0.04rem;
        img {
          width: 0.2rem;
          vertical-align: middle;
        }
      }
      th:nth-child(2n),
      td:nth-child(2n) {
        background: #fffcf6;
      }
      td:nth-child(1) {
        text-align: left;
        padding-left: 0.2rem;
      }
    }
    .describe {
      margin-left: 0.25rem;
      margin-bottom: 0.16rem;
      width: 5.5rem;
      border-radius: 0.05rem;
      padding: 0.1rem;
      background: linear-gradient(
        0deg,
        rgba(255, 213, 163, 0.11) 20%,
        rgba(255, 220, 169, 0.11) 100%
      );
      .describe_content {
        border: 1px solid rgba(249, 218, 158, 0.27);
        padding: 0.1rem;
        li {
          display: flex;
          label {
            min-width: 0.92rem;
            font-size: 0.15rem;
            color: #d41045;
            font-weight: 700;
            text-align: right;
            line-height: 0.24rem;
          }
          p {
            flex: auto;
            display: flex;
            line-height: 0.24rem;
            font-size: 0.15rem;
            color: #733a01;
          }
        }
      }
    }
  }
}
.conclusion_title {
  padding-top: 0.2rem;
  height: 0.22rem;
  background: url("../../assets/evaluation/tit_bg.png") no-repeat center 0.2rem;
  background-size: 1.15rem 0.22rem;
  text-align: center;
  font-size: 0.16rem;
  font-weight: bold;
  color: #333333;
  margin-bottom: 0.14rem;
}
.footer {
  height: 0.74rem;
  background: #fff;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 10px -2px 15px -13px rgba(0, 0, 0, 0.2) inset;
  .save_btn {
    width: 1.5rem;
    height: 0.36rem;
    background: #d41045;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.04rem;
    font-size: 0.16rem;
    color: #ffffff;
    margin-right: 0.3rem;
  }
  .goback_btn {
    width: 0.8rem;
    height: 0.36rem;
    background: #ffffff;
    border: 1px solid #dddfe6;
    border-radius: 0.04rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    font-size: 0.16rem;
    color: #5a6b80;
    right: 0.19rem;
    top: 0.17rem;
  }
}
.home_header {
  padding: 0.2rem 0.3rem;
  .flex {
    justify-content: center;
  }
  .hd_img {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    margin-right: 20px;
    img {
      display: block;
      width: 100%;
    }
  }
  .hd_name {
    font-size: 0.15rem;
    color: #5a6b80;
    img {
      display: inline-block;
      width: 0.2rem;
      height: 0.2rem;
      border-radius: 50%;
      margin-left: 10px;
      vertical-align: -20%;
    }
  }
  .hd_time {
    font-size: 0.12rem;
    color: #5a6b80;
    button {
      color: #5a6b80;
      border: 1px solid #5a6b80;
      border-radius: 2px;
      font-size: 0.12rem;
      background: #fff;
      margin-left: 0.1rem;
    }
  }
  .hd_icon {
    img {
      display: block;
      width: 0.3rem;
      height: 0.3rem;
      border-radius: 50%;
    }
  }
}
.home_info {
  background: #fafafa;
  font-size: 0.14rem;
  color: #5a6b80;
  height: 0.44rem;
  line-height: 0.44rem;
  padding: 0 0.3rem;
  position: relative;
  box-shadow: 10px -2px 15px -13px rgba(0, 0, 0, 0.2) inset;
  .flex_unit {
    margin-right: 0.35rem;
  }
  .hi_more {
    position: absolute;
    right: 0.2rem;
    top: 0;
    color: #1fa9da;
    i {
      color: #cccccc;
    }
  }
}
</style>